<?php
namespace app\index\model;
use think\Model;

class User extends Model
{
    public function getOne ($where) {
        $res = $this->where($where)->find();
        if($res) {
            return $res->toArray();
        }
        return false;
    }
    
    public function getList ($where) {
        $res = $this->where($where)->select();
        if($res) {
            return $res->toArray();
        }
        return false;
    }
    
    public function getUserByUid ($uid) {
        $user = $this->where('uid',$uid)->find();
        if($user) {
            return $user->toArray();
        }
        return false;
    }
}
